﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>欢迎登录后台管理系统</title>
<link th:href="@{/css/style.css}" rel="stylesheet" type="text/css" />
<script th:src="@{/js/jquery.js}"></script>
<script th:src="@{/js/base.js}"></script>
<script th:src="@{/js/cloud.js}" type="text/javascript"></script>

<script language="javascript">
	//构建用户名和密码
	function buildPostData(){
		return {"userName": $("#userName").val(),"password":$("#password").val()};
	}
	
	$(function(){
		//样式转换
		$('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
		$(window).resize(function(){  
    		$('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
    	})
    	//成功回调
    	function success(result){
			window.location.href = "main";
		}
		//失败回调
		function failure(result){
			//$("#errorMessage").html(result.message);
            alert(result.message);
		}
    	//登录操作
    	$("#login").click(function(){
    		postRequest("login",buildPostData(),success,failure);
    	});
	});
</script> 

</head>

<body style="background-color:#1c77ac; background-image:url(/images/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden;">


    <div id="mainBody">
      <div id="cloud1" class="cloud"></div>
      <div id="cloud2" class="cloud"></div>
    </div>  


<div class="logintop">    
    <span>欢迎登录后台管理界面平台</span>    
    <ul>
    <li><a href="/">回首页</a></li>
    <li><a href="https://www.cnblogs.com/liboware/">帮助</a></li>
    <li><a href="https://www.cnblogs.com/liboware/">我的博客</a></li>
    </ul>    
    </div>
    <div class="loginbody">
    <span class="systemlogo"></span> 
    <div class="loginbox">
    <ul>
    <li><input id="userName" type="text" class="loginuser" placeholder="请输入用户名或者邮箱" onclick="JavaScript:this.value=''"/></li>
    <li><input id="password" type="password" class="loginpwd" value="密码" placeholder="请输入密码" onclick="JavaScript:this.value=''"/></li>
    <li><input id="login" name="" type="button" class="loginbtn" value="登录"/><label><input name="" type="checkbox" value="" checked="checked" />记住密码</label><label><a href="/findPwd">忘记密码</a></label></li>
    <li><span id="errorMessage"></span></li>
    </ul>
    </div>
    </div>
    <div class="loginbm">
        版权所有2018 <a target="_blank" href="https://www.cnblogs.com/liboware/">李博/Alex</a>
        <b th:if="${system_profiles eq 'dev'}"><a href="h2db">【内存本地数据库】</a></b>
    </div>
</body>
</html>
